import subprocess
# 执行系统指令并获取输出信息
result = subprocess.run(['python', './ExperimentTestbed.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
# 获取标准输出信息
output = result.stdout.decode('gbk')
f = open("SolverStdOutput.log", "w")
f.write(output)
f.close()
# print("标准输出信息：\n", output)
# 获取错误输出信息
error = result.stderr.decode('gbk')
# print("错误输出信息：\n", error)
# 获取返回值
retcode = result.returncode
print("返回值：", retcode)